//
//  ViewController.swift
//  Match Egg
//
//  Created by jignesh on 21/09/19.
//  Copyright © 2019 PK Boss. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    @IBOutlet weak var toysBtn: UIButton!
    @IBOutlet weak var rateBtn: UIButton!
    @IBOutlet weak var howBtn: UIButton!
    
    var appID = "1493949287"
    
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view.
        
        toysBtn.layer.cornerRadius = toysBtn.frame.height / 2
        toysBtn.clipsToBounds = true
        
        howBtn.layer.cornerRadius = howBtn.frame.height / 2
        howBtn.clipsToBounds = true
        
        rateBtn.layer.cornerRadius = rateBtn.frame.height / 2
        rateBtn.clipsToBounds = true
    }


    @IBAction func toysBtnPressed(_ sender: UIButton) {
        
        if let ivc = storyboard?.instantiateViewController(withIdentifier: "matchVC") as? matchVC {
            
            self.present(ivc, animated: false, completion: nil)
        }
               
    }
    
    @IBAction func howBtnPressed(_ sender: UIButton) {
        
        if let ivc = storyboard?.instantiateViewController(withIdentifier: "HowtoplayVC") as? HowtoplayVC {
            
            self.present(ivc, animated: false, completion: nil)
        }
        
    }
    
    @IBAction func rateBtnPressed(_ sender: UIButton) {
        
        UIApplication.shared.openURL(URL(string : "itms-apps://itunes.apple.com/app/id\(appID)")!)
        
    }
}

